package com.ed.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user")
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String  username;     //用户昵称
    private String phone;    //手机号
    private String  name;     //真实姓名
    private String  password;   //密码
    private Integer sex;         //性别   0 女 1男
    private Integer age;         //年龄
    private Integer permission ;      //权限 1 管理员 2普通用户
    private String hospitalNum;     //住院号
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;   // 更新时间

}
